home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / emulator / bsvc-1.000 / bsvc-1 / bsvc-1.0.4 / samples / Motorola68000 / example.s < prev    next >
Text File  |  1995-07-26  |  342b  |  12 lines

  1.     ORG    $2000        Start at location 2000 Hex
  2.  
  3. START    CLR.W    SUM        Clear variable SUM
  4.     MOVE.W    COUNT,D0    Load COUNT value
  5. LOOP    ADD.W    D0,SUM        ADD D0 to SUM
  6.     SUB.W    #1,D0        Decrement counter
  7.     BNE    LOOP        Loop if counter not zero
  8.     BREAK            Tell the simulator to BREAK if we're running
  9.  
  10. SUM    DS.W    1        Reserve one word for SUM
  11. COUNT    DC.W    25        Initial value for COUNT
  12.